﻿#ifndef CommentInfo_H
#define CommentInfo_H
#include<QString>
#include <QList>
#include <QMap>

#if _MSC_VER >= 1600
#pragma execution_character_set("utf-8")
#endif

class CommentInfo
{
public:
    CommentInfo();
    CommentInfo(QString comment, QString user, QString star, QString hotel,
                QString hotelName, QString houseType, QString checkInTime,
                QString commentTime,QString userComment,QString reserveID);

    const QString &getComment() const;
    const QString &getUser() const;
    const QString &getUserName() const;
    const QString &getStar() const;
    const QString &getPhoto() const;
    const QString &getHotel() const;
    const QString &getReserveID() const;

    const QString &getHotelName() const;
    const QString &getHouseType() const;
    const QString &getCheckInTime() const;
    const QString &getCommentTime() const;
    const QString &getUserComment() const;
    const QString &getHotelComment() const;


    void setComment(const QString& comment);
    void setUser(const QString& user);
    void setUserName(const QString& user);
    void setStar(const QString& star);
    void setPhoto(const QString& path);
    void setHotel(const QString& hotel);
    void setReserveID(const QString& reserveID);

    void setHotelName(const QString& houseName);
    void setHouseType(const QString& houseType);
    void setCheckInTime(const QString& checkInTime);
    void setCommentTime(const QString& commentTime);
    void setUserComment(const QString& userComment);
    void setHotelComment(const QString& hotelComment);

private:
    QString m_comment;
    QString m_user;
    QString m_star;
    QString m_photo;
    QString m_hotel;

    QString m_hotelName;
    QString m_houseType;
    QString m_checkInTime;
    QString m_commentTime;
    QString m_userComment;

    QString m_hotelComment;
    QString m_reserveID;
    QString m_userName;
};

typedef QList<CommentInfo> CommentInfoList;
typedef QMap<QString, CommentInfoList::iterator> CommentInfoMap;  //网络操作使用


#endif // CommentInfo_H
